function [ observations ] = letterObservations( letterImg, models, handles, isTraining, trainingLetter )
    %This is a supervisor function to call different HMM observation extraction
    %methods
    %Get number of models
    nmodels = size(models,2);
    observations = cell(nmodels,1);
    
    for i = 1 : nmodels
        %Set the axes to corresponding panel
        switch i
            case 1
                pnl = handles.pnlModel1;
                lbl = handles.lblObservation1;
            case 2
                pnl = handles.pnlModel2;
                lbl = handles.lblObservation2;
            case 3
                pnl = handles.pnlModel3;
                lbl = handles.lblObservation3;
        end
        %Get the observation extraction function
        oef = eval(['@' models{i}.obsExtractionFunc]);  %# Concatenate string name with '@' and evaluate
        %Set parameters
        if isTraining
            nstates = getLetterStateNumber( models, trainingLetter, i );
        end
        observations(i) = {oef(letterImg, nstates)};
        %Convert the matrix to string
        obs = mat2str(observations{i});
        %Replace ';' by ';\n' in every seventh occurence
        scIndex = find(obs==';');
        scIndex = scIndex(7:7:end);
        obs(scIndex) = char(10);
        set(lbl, 'String',['Obs :' char(10) obs]);
    end
end

